const initState = {
  name: "张三",
  age: 17,
  sex: "男",
};

const userReducer = (state = initState, action: any) => {
  switch (action.type) {
    case "editName": {
      return {
        ...state,
        name: action.payload,
      };
    }
    default:
      return state;
  }
};

export default userReducer;
